\documentclass{report}
\title{Hello world}
% \author{Xiaofei Wang}
\usepackage[left=2cm,top=1cm,right=2cm]{geometry}
\usepackage{lineno,indentfirst}
\usepackage{tikz,array,forloop}
% \linenumbers{}
\newcounter{x}
\newcounter{y}
\begin{document}
\maketitle{}
\begin{table}
    \centering
    \begin{tabular}{ p{3.5cm} p{3.5cm} p{3.5cm}  p{3.5cm}}
    % \hline

        \forloop{y}{0}{\value{y} < 20}{
        \forloop{x}{0}{\value{x} < 4}{ % generates the header row of the table
        
        %   \pgfmathsetmacro{\number1}{random(100)}
            $
        \pgfmathrandominteger{\numberOne}{1}{1000}
        \pgfmathrandominteger{\numberTwo}{1}{1000}
        \numberOne
        \pgfmathparse{ifthenelse(\numberOne<\numberTwo, "+", "-")}\pgfmathresult
        \numberTwo
        =
        $ \par
        \ifthenelse{\value{x}<3}{&}{}
                    % one less '&' than the number of columns
                    }\\
        }
    \end{tabular}

\end{table}


\end{document}

